package cn.bugstack.dao;

import cn.bugstack.domain.po.OrderPO;
import cn.bugstack.domain.po.OrderProductPO;
import cn.bugstack.domain.po.PayOrder;
import cn.bugstack.domain.vo.RecordingVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface IOrderDao {
    void insert(OrderPO orderPO);

    PayOrder queryUnPayOrder(PayOrder payOrderReq);

    void updateOrderPayInfo(OrderPO orderPO);

    void changeOrderPaySuccess(PayOrder payOrderReq);

    List<String> queryNoPayNotifyOrder();

    List<String> queryTimeoutCloseOrderList();


    boolean changeOrderClose(String orderId);

    /**
     * 以下是为拓展批量购买新增接口
     * @param orderPO
     * @return
     */
    OrderPO queryUnPayOrderPO(OrderPO orderPO);

    List<RecordingVO> selectHistoryOrder(String userId);

    List<OrderProductPO> selectHistoryOrderItem(String orderId);

    boolean deleteOrder(String userId, String orderId);
}
